package com.springstudy.shiro.shiro;

import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.session.Session;

/**
 * 会话监听器，用于监听回话状态
 * @author chenrongrong
 * @since 2020/3/11 11:00
 */
@Slf4j
public class SessionListener implements org.apache.shiro.session.SessionListener {
    @Override
    public void onStart(Session session) {
        log.info("Session创建");
    }

    @Override
    public void onStop(Session session) {
        log.info("Session停止");
    }

    @Override
    public void onExpiration(Session session) {
        log.info("Session过期");
    }
}
